﻿<%@  Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Site.Models.CommonStats>>" %>


<h2>Statistiques par utilisateur</h2>
<fieldset>
<legend>Statistiques </legend>

<table>

                
    <tr>

        <th>
            UserName
        </th>
  
        <th>
            Rank
        </th>
        <th>
            WonGames
        </th>
        <th>
            LostGames
        </th>
        <th>
            CanceledGames
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
    
        <td>
           
            <%=Html.RouteLink(
            item.UserName,            
            new
            {
              controller = "User",
              action = "Details",
              id = item.UserId
            })%>
        </td>
        


        <td>
            <%: Html.DisplayFor(modelItem => item.Rank) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.WonGames) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.LostGames) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.CanceledGames) %>
        </td>
        <td>
        |
            <%: Html.ActionLink("Details", "Details", new {  id=item.StatId  }) %> |
            <%: Html.ActionLink("Initialiser", "Reset", new { id = item.StatId })%>
        </td>
    </tr>
<% } %>

</table>

</fieldset>